package conf

import "fmt"

type ConfigBanWord struct {
	Id   int
	Text string
}

var ConfigBanWordSlice []*ConfigBanWord

func init() {
	LoadConfig()
	fmt.Println("违禁词库配置初始化完成！")
}

// 加载必要配置
func LoadConfig() {
	ConfigBanWordSlice = append(ConfigBanWordSlice,
		&ConfigBanWord{1, "外挂"},
		&ConfigBanWord{2, "启动"},
		&ConfigBanWord{3, "代练"},
		&ConfigBanWord{4, "吸毒"},
		&ConfigBanWord{5, "杀戮"},
	)
}

// 拿到基础违禁词库
func GetBanWordBase() []string {
	retString := make([]string, 0)
	for _, v := range ConfigBanWordSlice {
		retString = append(retString, v.Text)
	}
	return retString
}
